package com.lonty.intelligence.mapper;

import com.lonty.intelligence.model.Household;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 陈璇
 * @Date 2020/4/17 10:50
 * @Version 1.0
 */
@Mapper
public interface HouseholdMapper {

    /**
     * 保存住户
     * @param household
     * @return
     */
    int saveHousehold(Household household);

    /**
     * 根据ID获取住户
     * @param id
     * @return
     */
    Household getById(String id);

    /**
     * 根据手机号获取住户
     * @param telephone
     * @return
     */
    Household getByTelephone(String telephone);

    /**
     * 根据楼栋ID获取住户信息
     * @param buildingId
     * @return
     */
    List<Household> getByBuildingId(String buildingId);

    /**
     * 根据ID住户
     * @param household
     * @return
     */
    int modifyHousehold(Household household);

    /**
     * 删除住户
     * @param id
     * @return
     */
    int deleteHousehold(String id);

}
